home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / relnotes / eoe / chC.z / chC
Text File  |  1998-11-02  |  15KB  |  397 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        1.  _C_o_m_p_a_t_i_b_i_l_i_t_y
  9.  
  10.        This chapter contains information about compatibility issues
  11.        within the IRIX6.x releases with respect to X/Open XPG4
  12.        compliance and Posix compliance and also presents
  13.        information regarding structural changes within the IRIX6.x
  14.        releases that those developing kernel-loaded filesystem code
  15.        need to be aware of.
  16.  
  17.        1.1  _X_P_G_4__c_o_m_p_a_t_i_b_i_l_i_t_y
  18.  
  19.        XPG4 compliance can be achieved by doing one of the
  20.        following:
  21.  
  22.          1.  Installing the all platforms IRIX6.2 release along
  23.              with the 6666....2222++++xxxxppppgggg4444 patch (patch 1125).
  24.  
  25.          2.  Installing the all platforms IRIX6.5 release.
  26.  
  27.        The default behavior for the IRIX6.2 and IRIX6.5 commands is
  28.        non-X/Open XPG4 behavior which is traditional IRIX behavior.
  29.        See the below discussion under ////ssssbbbbiiiinnnn////sssshhhh in order to obtain
  30.        XPG4 behavior under the XPG4 compliant shell environment.
  31.  
  32.        1.1.1  _/_s_b_i_n_/_s_h  In order to obtain XPG4 behavior, the
  33.        ////ssssbbbbiiiinnnn////sssshhhh shell must be used and the following environment
  34.        variables must take on the below settings:
  35.  
  36.        eeeexxxxppppoooorrrrtttt ____XXXXPPPPGGGG====1111
  37.        uuuunnnnsssseeeetttt NNNNOOOOMMMMSSSSGGGGLLLLAAAABBBBEEEELLLL
  38.        eeeexxxxppppoooorrrrtttt NNNNOOOOMMMMSSSSGGGGSSSSEEEEVVVVEEEERRRRIIIITTTTYYYY====1111
  39.  
  40.        Please read the CCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTYYYY IIIISSSSSSSSUUUUEEEESSSS section of the sssshhhh((((1111))))
  41.        man page for further discussion.
  42.  
  43.        1.1.2  _/_s_b_i_n_/_s_e_d  There are several items which could
  44.        produce compatibility inconsistencies between traditional
  45.        IRIX behavior and X/Open XPG4 behavior.
  46.  
  47.        1.1.2.1  _s__a_n_d__l__c_o_m_m_a_n_d_s  See the man page sssseeeedddd((((1111)))).
  48.  
  49.        1.1.2.2  _e_s_c_a_p_e__c_h_a_r_a_c_t_e_r_s  Since X/Open regular expressions
  50.        were introduced starting in IRIX6.4, there are some
  51.        differences which can occur with respect to the back-slash
  52.        escape character.
  53.  
  54.        The below example shows this incompatibility.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.        sed -n -e "/searchfor/,/\};/p" filename
  75.  
  76.        The file 'filename'  doesn't exist.
  77.  
  78.        Under IRIX6.2:
  79.        ==============
  80.        Can't open filename
  81.  
  82.        Under IRIX6.4 & 6.5
  83.        ===================
  84.        sed: command garbled: /searchfor/,/\};/p
  85.  
  86.        The problem lies with the \} sequence because '\{' and '\}' are
  87.        meaningful to the X/Open regular expressions.  The sed script
  88.        is in error by specifying '\}' and should just be '}'.  See the
  89.        BBBBaaaassssiiiicccc RRRReeeegggguuuullllaaaarrrr EEEExxxxpppprrrreeeessssssssiiiioooonnnnssss section from rrrreeeeggggccccoooommmmpppp((((5555)))).
  90.  
  91.        1.1.3  _/_s_b_i_n_/_r_m  The ----iiii and the ----ffff options if both specified
  92.        have a defined XPG4 behavior.  From the XPG4 specification:
  93.  
  94.             ----iiii ---- PPPPrrrroooommmmpppptttt ffffoooorrrr ccccoooonnnnffffiiiirrrrmmmmaaaattttiiiioooonnnn aaaassss ddddeeeessssccccrrrriiiibbbbeeeedddd pppprrrreeeevvvviiiioooouuuussssllllyyyy.... AAAAnnnnyyyy
  95.             pppprrrreeeevvvviiiioooouuuussss ooooccccccccuuuurrrrrrrreeeennnncccceeeessss ooooffff tttthhhheeee ----ffff ooooppppttttiiiioooonnnn wwwwiiiillllllll bbbbeeee iiiiggggnnnnoooorrrreeeedddd....
  96.  
  97.        E.g., rrrrmmmm ----ffff ----iiii behaves differently than rrrrmmmm ----iiii ----ffff.  This is
  98.        most of an issue with shell aliases or functions.
  99.  
  100.        1.1.4  _/_u_s_r_/_b_i_n_/_l_o_c_a_l_e_d_e_f  There is an incompatibility
  101.        between generated versions of the LLLLCCCC____TTTTYYYYPPPPEEEE locale category
  102.        prior to the IRIX 6.5 release and IRIX 6.5.  That is, binary
  103.        locales generated prior to IRIX 6.5 will not be recognized
  104.        by IRIX 6.5 and must be regenerated with the IRIX 6.5
  105.        version of llllooooccccaaaalllleeeeddddeeeeffff((((1111)))).  See the NNNNOOOOTTTTEEEE section in the
  106.        llllooooccccaaaalllleeeeddddeeeeffff((((1111)))) man page.
  107.  
  108.        1.1.5  _r_e_g_u_l_a_r__e_x_p_r_e_s_s_i_o_n_s  In IRIX6.3 and earlier the below
  109.        IRIX 6.x versions of the commands:
  110.  
  111.        sssseeeedddd,,,, eeeedddd,,,, eeeexxxx,,,, eeeexxxxpppprrrr,,,, vvvviiii,,,, ggggrrrreeeepppp,,,, eeeeggggrrrreeeepppp,,,, fffflllleeeexxxx,,,, aaaawwwwkkkk,,,, ffffiiiinnnndddd,,,, ppppaaaaxxxx,,,, mmmmoooorrrreeee
  112.  
  113.        all used the rrrreeeeggggeeeexxxxpppp((((5555)))) version of regular expressions.  In
  114.        IRIX6.4 and later versions of the above commands use the
  115.        rrrreeeeggggccccoooommmmpppp((((5555)))) X/Open version of regular expressions.
  116.  
  117.        1.1.6  _k_e_r_n_e_l__s_y_s_t_u_n_e_s  The following systune variables must
  118.        be set to be XPG4 compliant:
  119.  
  120.        ppppoooossssiiiixxxx____ttttttttyyyy____ddddeeeeffffaaaauuuulllltttt 1111
  121.        rrrreeeessssttttrrrriiiicccctttteeeedddd____cccchhhhoooowwwwnnnn 1111
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137.  
  138.  
  139.  
  140.        1.1.7  _c_o_m_p_i_l_a_t_i_o_n__e_n_v_i_r_o_n_m_e_n_t  The XPG4 compatible compiler
  141.        is ////uuuussssrrrr////bbbbiiiinnnn////cccc88889999.  The following command line options must be
  142.        passed to the ////uuuussssrrrr////bbbbiiiinnnn////cccc88889999 compiler:
  143.  
  144.        ----DDDD____XXXXOOOOPPPPEEEENNNN____SSSSOOOOUUUURRRRCCCCEEEE ----UUUUuuuunnnniiiixxxx
  145.  
  146.        1.1.8  _/_s_b_i_n_/_t_o_u_c_h  There is a Y2K incompatibility issue
  147.        with the ttttoooouuuucccchhhh command in IRIX releases prior to IRIX 6.5.
  148.        The Y2K compliant versions of the ttttoooouuuucccchhhh command exist in the
  149.        IRIX 6.2+xpg4 patch as well as in the IRIX 6.5 release.  See
  150.        the ttttoooouuuucccchhhh((((1111)))) man page for the ----tttt option usage.
  151.  
  152.        In particular, the behavior of the frequently used kernel
  153.        driver exitop (to force kernels to be rebuilt after new
  154.        drivers are installed) ttttoooouuuucccchhhh 0000111100001111000000000000000000000000 is now different,
  155.        and its use will cause kernels to not be rebuilt when they
  156.        should.  Instead use ttttoooouuuucccchhhh 111199997777000000001111000011110000000000000000.
  157.  
  158.        1.2  _P_o_s_i_x__c_o_m_p_a_t_i_b_i_l_i_t_y
  159.  
  160.        1.2.1  _k_e_r_n_e_l__s_y_s_t_u_n_e_s  The following systune variables must
  161.        be set to be POSIX compliant:
  162.  
  163.        ppppoooossssiiiixxxx____ttttttttyyyy____ddddeeeeffffaaaauuuulllltttt 1111
  164.        rrrreeeessssttttrrrriiiicccctttteeeedddd____cccchhhhoooowwwwnnnn 1111
  165.  
  166.        1.3  _F_i_l_e_s_y_s_t_e_m__i_m_p_l_e_m_e_n_t_a_t_i_o_n__i_s_s_u_e_s
  167.  
  168.        Significant changes have been made in IRIX6.x releases that
  169.        those implementing and maintaining kernel-loaded filesystems
  170.        need to be particularly aware of:
  171.  
  172.          1.  In IRIX6.4, a behavior stacking model was introduced
  173.              which changes substantially the structure of VOP and
  174.              VFS op signatures and requires other changes in
  175.              filesystem code designed to be loaded with the kernel.
  176.  
  177.          2.  In IRIX6.5, the requirements for the use of the
  178.              behavior stacking code have been tightened, requiring
  179.              changes in addition to the normal modification of
  180.              filesystem code to adapt to additions or signature
  181.              changes in the VOP and VFS interfaces between IRIX6.4
  182.              and IRIX6.5.
  183.  
  184.        1.3.1  _B_e_h_a_v_i_o_r__s_t_a_c_k_i_n_g__m_o_d_e_l__i_n__I_R_I_X_6_._4  IRIX6.4
  185.        introduced new structures associated with v-objects such as
  186.        vnodes and vfs's.  These allow multiple layers of filesystem
  187.        implementation to be stacked such that one layer may
  188.        interpose on calls (such as VOP's) for the v-object.  This
  189.        structure has necessitated changes in external filesystem
  190.        code, even when the filesystem in question does not
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.  
  204.  
  205.  
  206.        explicitly use any new features of this model.
  207.  
  208.        In IRIX6.4, the behavior head and behavior descriptor
  209.        structures were introduced and the VOP and VFS interfaces
  210.        were modified so that the initial parameter passed to the
  211.        called ops functions was the behavior descriptor, rather
  212.        then the v-object (vnode or vfs) itself.  In addition,
  213.        filesystems needed to link a behavior descriptor onto the
  214.        behavior chain and remove the behavior descriptor at object
  215.        initialization and destruction time respectively.
  216.  
  217.        For filesystems using non-VSHARE vnodes,  (non-VSHARE vnode
  218.        are those whose allocation is directly managed by the
  219.        filesystem. VSHARE vnodes are managed in a global vnode pool
  220.        shared by multiple filesystems), the filesystem needs to
  221.        properly initialize the behavior head of the vnode
  222.        immediately after it is allocated (using vn_bhv_head_init)
  223.        and call a destroy function (vn_bhv_head_destroy) on the
  224.        behavior head immediately before deallocating the vnode.
  225.  
  226.        If a filesystem implementation allocates its own vfs
  227.        structures, similar requirements apply.  The behavior head
  228.        within the vfs should be initialized using bhv_head_init and
  229.        bhv_head_destroy should be called before deallocating the
  230.        memory of the vfs structure.  This would be an unusual
  231.        situation since typically the vfs is allocated by the kernel
  232.        before calling the filesystem VFS_MOUNT routine and
  233.        deallocated by the kernel after the filesystem's VFS_UNMOUNT
  234.        routine has executed.
  235.  
  236.        See /usr/include/sys/vnode.h, /usr/include/sys/vfs.h, and
  237.        /usr/include/ksys/behavior.h for a lot of relevant detail.
  238.  
  239.        1.3.2  _F_u_r_t_h_e_r__r_e_q_u_i_r_e_m_e_n_t_s__f_o_r__I_R_I_X_6_._5  For filesystem code
  240.        developed to run in an IRIX6.4 kernel environment, the major
  241.        change has to do with requirements to intialize and destroy
  242.        behavior head structures in non-VSHARE vnode and in vfs
  243.        structures allocated by the filesystem itself.
  244.  
  245.         While this was also part of the interface for IRIX6.4, as
  246.        described above, the implementation allowed filesystem code
  247.        to run successfully without dealing properly with the
  248.        behavior head structures.  In particular, if the vnode (or
  249.        an allocated vfs) was zeroed, the behavior head
  250.        initialization did not need to be done and also, the destroy
  251.        function was a no-op.  In IRIX6.5, this is no longer the
  252.        case, the behavior head for a non-VSHARE vnode must be
  253.        properly initialized and destroyed.
  254.  
  255.        Also note that it is more critical in IRIX6.5 that behaviors
  256.        are properly unstacked before the objects associated with
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                   - 5 -
  269.  
  270.  
  271.  
  272.        them are made available for dellocation.  This may have gone
  273.        unnnoticed in IRIX6.4.
  274.  
  275.        1.3.3  _S_u_m_m_a_r_y _o_f _r_e_q_u_i_r_e_m_e_n_t_s _f_o_r _b_e_h_a_v_i_o_r _s_t_r_u_c_t_u_r_e
  276.        _m_a_n_a_g_e_m_e_n_t
  277.  
  278.        1.3.3.1  _F_o_r__n_o_n_-_V_S_H_A_R_E__v_n_o_d_e_s  A filesystem should, after
  279.        using vn_alloc:
  280.  
  281.          1.  Initialize its behavior descriptor using
  282.              vn_bhv_desc_init.
  283.  
  284.          2.  Link the behavior descriptor into the behavior head
  285.              using vn_bhv_insert_initial.
  286.        A filesystem should remove its behavior descriptor using
  287.        vn_bhv_remove before returning from a VOP_RECLAIM or
  288.        VOP_INACTIVE returning VN_INACTIVE_NOCACHE or before doing a
  289.        direct vn_free.
  290.  
  291.        1.3.3.2  _F_o_r__n_o_n_-_V_S_H_A_R_E__v_n_o_d_e_s  A filesystem should, after
  292.        allocating a vnode:
  293.  
  294.          1.  Initialize its behavior descriptor using
  295.              vn_bhv_desc_init.
  296.  
  297.          2.  Initialize the behavior head of a new vnode using
  298.              vn_bhv_head_init.
  299.  
  300.          3.  Link the behavior descriptor into the behavior head
  301.              using vn_bhv_insert_initial.
  302.        Before deallocating a vnode, a filesystem should:
  303.  
  304.          1.  Remove its behavior descriptor using vn_bhv_remove.
  305.  
  306.          2.  Call vn_bhv_head_destroy on the behavior head for the
  307.              vnode to be deallocated.
  308.  
  309.        1.3.3.3  _F_o_r__n_o_r_m_a_l__(_i_._e__k_e_r_n_e_l_-_a_l_l_o_c_a_t_e_d_)__v_f_s__s_t_r_u_c_t_u_r_e_s
  310.        At mount time, the filesystem should initialize its behavior
  311.        descriptor and insert it in the vfs behavior head using
  312.        vfs_insertbhv.
  313.  
  314.        At unmount time, the filesystem should remove its behavior
  315.        descriptor from the vfs behavior head using VFS_REMOVEBHV.
  316.  
  317.        1.3.3.4  _F_o_r _v_f_s _s_t_r_u_c_t_u_r_e_s _a_l_l_o_c_a_t_e_d _b_y _t_h_e _f_i_l_e_s_y_s_t_e_m
  318.        _i_t_s_e_l_f  After allocating such a vfs structure, the
  319.        filesystem should:
  320.  
  321.          1.  Initialize the behavior head within the vfs, using
  322.              bhv_head_init.
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                   - 6 -
  335.  
  336.  
  337.  
  338.          2.  Initialize its behavior descriptor and insert it in
  339.              the vfs behavior head using vfs_insertbhv.
  340.        Before deallocating such a vfs structure, the filesystem
  341.        should:
  342.  
  343.          1.  Remove its behavior descriptor from the vfs behavior
  344.              head using VFS_REMOVEBHV.
  345.  
  346.          2.  Use bhv_head_destroy on the behavior head for the vfs
  347.              to get rid of any associated resources.
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.